package server;

import interfaces.Category;

import java.rmi.RemoteException;

import javax.rmi.PortableRemoteObject;

public class CategoryImpl extends PortableRemoteObject implements Category {
	private int id = 0;
	private String name = null;

	/**
	 * Constructor
	 * @param newId		The id
	 * @param newName	The name
	 * @throws RemoteException
	 */
	public CategoryImpl( int newId, String newName ) throws RemoteException {
		super();
		
		id = newId;
		name = newName;
	}

	/**
	 * Returns the Category id
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public int getId() {
		return id;
	}

	/**
	 * Returns the Category id
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public String getName() {
		return name;
	}
}
